<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/taglib_include.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, target-densitydpi=medium-dpi, initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<link href="${ctx}/css/main.css?ver=${main_css_version}" rel="stylesheet" type="text/css" />
<title>${projectTitle }</title>
</head>
<body>
  <header id="main-top">
    <a href="${ctx}/trafficline/index.do?startCityId=${ticketQueryParam.startCityId}&starting=${ticketQueryParam.starting}&startStationId=${ticketQueryParam.startStationId}&arriveCityId=${ticketQueryParam.arriveCityId}&destination=${ticketQueryParam.destination }&arriveStationId=${ticketQueryParam.arriveStationId }&leaveDate=${ticketQueryParam.leaveDate}&groupId=${ticketQueryParam.groupId}">
      <div id="main-top-left">
        <img src="${ctx}/images/mui_title_back_btn.png" class="img-2">
      </div>
    </a>
    <div id="main-top-title">选择出发站</div>
  </header>
  <div id="container">
  <c:forEach var="startStation" items="${startStations }">
      <div id="city-${startStation.cityId }" class="city-list">
        <h4>${startStation.cityInitial }</h4>
        <ul>
          <li data-url="${ctx}/trafficline/index.do?startCityId=${startStation.cityId}&starting=${startStation.cityName}&startStationId=&arriveCityId=${ticketQueryParam.arriveCityId}&destination=${ticketQueryParam.destination }&arriveStationId=${ticketQueryParam.arriveStationId }&leaveDate=${ticketQueryParam.leaveDate}&groupId=${ticketQueryParam.groupId}">${startStation.cityName}（所有客运站）</li>
          <c:forEach var="station" items="${startStation.stations }">
          <li data-url="${ctx}/trafficline/index.do?startCityId=&starting=${station.stationName}&startStationId=${station.stationId }&arriveCityId=${ticketQueryParam.arriveCityId}&destination=${ticketQueryParam.destination }&arriveStationId=${ticketQueryParam.arriveStationId }&leaveDate=${ticketQueryParam.leaveDate}&groupId=${ticketQueryParam.groupId}">${station.stationName }</li>
          </c:forEach>
        </ul>
      </div>
  </c:forEach>
  </div>
  <script type="text/javascript" src="${ctx}/js/jquery.min.js?ver=${jquery_min_version}"></script>
  <script type="text/javascript">
  $(document).ready(function() {
	  // 点中选项后返回到车票查询页面
      $("li").on("click", function(e) {
          var url = $(this).attr("data-url");
          window.location.href = url;
      });
  });
  </script>
</body>
</html>
